<?php

namespace App\Enums;

class TaskEnum {

    /**********任务模块相关**********/
    // 每日任务
    const TASK_MODULE_EVERY_DAY = 1;

    // 新手任务
    const TASK_MODULE_NEW_PLAYER = 2;

    // 任务模块列表
    const TASK_MODULE_LIST = [
        self::TASK_MODULE_EVERY_DAY,
        self::TASK_MODULE_NEW_PLAYER
    ];

    // 任务模块名称映射
    const TASK_MODULE_NAME_MAP = [
        self::TASK_MODULE_EVERY_DAY => "每日任务",
        self::TASK_MODULE_NEW_PLAYER => "新手任务"
    ];

    // 每日任务持续天数
    const TASK_DELAY_DAY_EVERY_DAY = 1;

    // 新手任务持续天数
    const TASK_DELAY_DAY_NEW_PLAYER = 10;

    // 新手任务展示天数
    const TASK_SHOW_DAY_NEW_PLAYER = 7;

    // 每日任务循环起始日期
    const TASK_EVERY_DAY_START_DATE = "2020-01-01";

    /**********任务类型相关**********/
    // 新手每日汇总任务
    const TASK_TYPE_NEW_PLAYER_SUMMARY = 1;

    // 新手礼包任务
    const TASK_TYPE_GIFT_BAG_TYPE = 2;

    // 累计登录
    const TASK_TYPE_SUMMARY_LOGIN = 3;

    // 进房累计时长
    const TASK_TYPE_SUMMARY_JOIN_ROOM_DELAY = 4;

    // 累计参与浇水次数
    const TASK_TYPE_PLAY_WATERING_TIMES = 5;

    // 每日参与浇水次数
    const TASK_TYPE_PLAY_WATERING_DAILY_TIMES = 6;

    // 累计分享次数
    const TASK_TYPE_SHARE_TIMES = 7;

    // 累计关注房间个数
    const TASK_TYPE_FOLLOW_ROOM_NUMBER = 8;

    // 每日关注房间个数
    const TASK_TYPE_FOLLOW_ROOM_DAILY_NUMBER = 9;

    // 关注用户个数
    const TASK_TYPE_FOLLOW_USER_NUMBER = 10;

    // 每日关注用户个数
    const TASK_TYPE_FOLLOW_USER_DAILY_NUMBER = 11;

    // 累计公屏聊天次数
    const TASK_TYPE_PUBLIC_CHAT_TIMES = 12;

    // 每日公屏聊天次数
    const TASK_TYPE_PUBLIC_CHAT_DAILY_TIMES = 13;

    // 发送表情次数(暂无)
    const TASK_TYPE_SEND_FACE_TIMES = 14;

    // 累计添加好友个数
    const TASK_TYPE_HAS_FRIEND_NUMBER = 15;

    // 每日添加好友个数
    const TASK_TYPE_HAS_FRIEND_DAILY_NUMBER = 16;

    // 累计赠送礼物次数
    const TASK_TYPE_GIVE_GIFT_TIMES = 17;

    // 每日赠送礼物次数
    const TASK_TYPE_GIVE_GIFT_DAILY_TIMES = 18;

    // 累计收到礼物的价值
    const TASK_TYPE_RECEIVE_GIFT_MONEY = 19;

    // 累计参与红包雨次数(暂无)
    const TASK_TYPE_PLAY_RED_PACK_RAIN_TIMES = 20;

    // 每日参与红包雨次数(暂无)
    const TASK_TYPE_PLAY_RED_PACK_RAIN_DAILY_TIMES = 21;

    // 完成实名认证
    const TASK_TYPE_COMPLETE_VERIFY = 22;

    // 设置个性签名
    const TASK_TYPE_SET_PERSON_SIGN = 23;

    // 创建房间
    const TASK_TYPE_CREATE_ROOM = 24;

    // 累计充值次数
    const TASK_TYPE_RECHARGE_TIMES = 25;

    // 每日充值次数
    const TASK_TYPE_RECHARGE_DAILY_TIMES = 26;

    // 累计充值金额
    const TASK_TYPE_RECHARGE_MONEY = 27;

    // 每日充值金额
    const TASK_TYPE_RECHARGE_DAILY_MONEY = 28;

    // 累计进入不同房间个数
    const TASK_TYPE_ENTER_DIFF_ROOM_NUMBER = 29;

    // 累计参与抢钻石次数
    const TASK_TYPE_RED_ENVELOPE_TIMES = 30;

    // 每日参与抢钻石次数
    const TASK_TYPE_RED_ENVELOPE_DAILY_TIMES = 31;

    // 累计邀请好友次数
    const TASK_TYPE_INVITE_FRIEND_TIMES = 32;

    // 每日邀请好友次数
    const TASK_TYPE_INVITE_FRIEND_DAILY_TIMES = 33;

    // 每日礼盒兑换次数(暂无)
    const TASK_TYPE_BOX_EXCHANGE_DAILY_TIMES = 34;

    // 每日积分商城兑换次数
    const TASK_TYPE_INTEGRAL_EXCHANGE_DAILY_TIMES = 35;

    // 每日累计收到礼物的价值
    const TASK_TYPE_RECEIVE_GIFT_DAILY_MONEY = 36;

    // 每日累计进房时长
    const TASK_TYPE_SUMMARY_JOIN_ROOM_DAILY_DELAY = 37;

    // 每日累计进不同房间个数
    const TASK_TYPE_ENTER_DIFF_ROOM_DAILY_NUMBER = 38;

    // 类型名称映射
    const TASK_TYPE_NAME_MAP = [
        self::TASK_TYPE_NEW_PLAYER_SUMMARY => "新手每日汇总任务",
        self::TASK_TYPE_GIFT_BAG_TYPE => "新手礼包任务",
        self::TASK_TYPE_SUMMARY_LOGIN => "累计登录",
        self::TASK_TYPE_SUMMARY_JOIN_ROOM_DELAY => "进房累计时长",
        self::TASK_TYPE_SUMMARY_JOIN_ROOM_DAILY_DELAY => "每日累计进房时长",
        self::TASK_TYPE_PLAY_WATERING_TIMES => "累计参与浇水次数",
        self::TASK_TYPE_PLAY_WATERING_DAILY_TIMES => "每日参与浇水次数",
        self::TASK_TYPE_SHARE_TIMES => "累计分享次数",
        self::TASK_TYPE_FOLLOW_ROOM_NUMBER => "累计关注房间个数",
        self::TASK_TYPE_FOLLOW_ROOM_DAILY_NUMBER => "每日关注房间个数",
        self::TASK_TYPE_FOLLOW_USER_NUMBER => "关注用户个数",
        self::TASK_TYPE_FOLLOW_USER_DAILY_NUMBER => "每日关注用户个数",
        self::TASK_TYPE_PUBLIC_CHAT_TIMES => "累计公屏聊天次数",
        self::TASK_TYPE_PUBLIC_CHAT_DAILY_TIMES => "每日公屏聊天次数",
        self::TASK_TYPE_SEND_FACE_TIMES => "发送表情次数",
        self::TASK_TYPE_HAS_FRIEND_NUMBER => "累计添加好友个数",
        self::TASK_TYPE_HAS_FRIEND_DAILY_NUMBER => "每日添加好友个数",
        self::TASK_TYPE_GIVE_GIFT_TIMES => "累计赠送礼物次数",
        self::TASK_TYPE_GIVE_GIFT_DAILY_TIMES => "每日赠送礼物次数",
        self::TASK_TYPE_RECEIVE_GIFT_MONEY => "累计收到礼物的价值",
        self::TASK_TYPE_RECEIVE_GIFT_DAILY_MONEY => "每日累计收到礼物的价值",
        self::TASK_TYPE_PLAY_RED_PACK_RAIN_TIMES => "累计参与红包雨次数",
        self::TASK_TYPE_PLAY_RED_PACK_RAIN_DAILY_TIMES => "每日参与红包雨次数",
        self::TASK_TYPE_COMPLETE_VERIFY => "完成实名认证",
        self::TASK_TYPE_SET_PERSON_SIGN => "设置个性签名",
        self::TASK_TYPE_CREATE_ROOM => "创建房间",
        self::TASK_TYPE_RECHARGE_TIMES => "累计充值次数",
        self::TASK_TYPE_RECHARGE_DAILY_TIMES => "每日充值次数",
        self::TASK_TYPE_RECHARGE_MONEY => "累计充值金额",
        self::TASK_TYPE_RECHARGE_DAILY_MONEY => "每日充值金额",
        self::TASK_TYPE_ENTER_DIFF_ROOM_NUMBER => "累计进入不同房间个数",
        self::TASK_TYPE_ENTER_DIFF_ROOM_DAILY_NUMBER => "每日累计进不同房间个数",
        self::TASK_TYPE_RED_ENVELOPE_TIMES => "累计参与抢钻石次数",
        self::TASK_TYPE_RED_ENVELOPE_DAILY_TIMES => "每日参与抢钻石次数",
        self::TASK_TYPE_INVITE_FRIEND_TIMES => "累计邀请好友次数",
        self::TASK_TYPE_INVITE_FRIEND_DAILY_TIMES => "每日邀请好友次数",
        self::TASK_TYPE_BOX_EXCHANGE_DAILY_TIMES => "每日礼盒兑换次数",
        self::TASK_TYPE_INTEGRAL_EXCHANGE_DAILY_TIMES => "每日积分商城兑换次数",
    ];
    /**********跳转类型**********/
    // 跳任意房间
    const TASK_LINK_NONE = 0;

    // 跳任意房间
    const TASK_LINK_ANY_ROOM = 1;

    // 跳个人房间
    const TASK_LINK_USER_ROOM = 2;

    // 跳首页
    const TASK_LINK_HOME = 3;

    // 跳实名认证
    const TASK_LINK_VERIFY = 4;

    // 跳个人资料编辑
    const TASK_LINK_USER_INFO_EDIT = 5;

    // 跳我的
    const TASK_LINK_MINE = 6;

    // 跳充值
    const TASK_LINK_RECHARGE = 7;

    // 跳邀请码
    const TASK_LINK_INVITE_CODE = 8;

    // 跳积分商城
    const TASK_LINK_INTEGRAL_MALL = 9;

    // 跳个人主页
    const TASK_LINK_USER_HOME = 10;

    // 跳创建房间
    const TASK_LINK_CREATE_ROOM = 11;

    // 跳转名称映射
    const TASK_LINK_NAME_MAP = [
        self::TASK_LINK_ANY_ROOM => "跳任意房间",
        self::TASK_LINK_USER_ROOM => "跳个人房间",
        self::TASK_LINK_HOME => "跳首页",
        self::TASK_LINK_VERIFY => "跳实名认证",
        self::TASK_LINK_USER_INFO_EDIT => "跳个人资料编辑",
        self::TASK_LINK_MINE => "跳我的",
        self::TASK_LINK_RECHARGE => "跳充值",
        self::TASK_LINK_INVITE_CODE => "跳邀请码",
        self::TASK_LINK_INTEGRAL_MALL => "跳积分商城",
        self::TASK_LINK_USER_HOME => "跳个人主页",
        self::TASK_LINK_CREATE_ROOM => "跳创建房间",
    ];

    // 与客户端的类型映射
    // 跳转目标 0: 不跳转 1: 房间 2: 首页 3: 实名认证 4: 个人资料编辑 5: 我的 6: 充值 7: 我的邀请码 8: 许愿礼盒 9: 创建房间 10: 积分商城 11: 个人主页
    const TASK_LINK_CLINT_TYPE_MAP = [
        self::TASK_LINK_ANY_ROOM => 1,
        self::TASK_LINK_USER_ROOM => 1,
        self::TASK_LINK_HOME => 2,
        self::TASK_LINK_VERIFY => 3,
        self::TASK_LINK_USER_INFO_EDIT => 4,
        self::TASK_LINK_MINE => 5,
        self::TASK_LINK_RECHARGE => 6,
        self::TASK_LINK_INVITE_CODE => 7,
        self::TASK_LINK_INTEGRAL_MALL => 10,
        self::TASK_LINK_USER_HOME => 11,
        self::TASK_LINK_CREATE_ROOM => 9,
    ];

    /**********新手任务每日相关**********/
    // 未开放
    const TASK_NEW_PLAYER_DAILY_STATUS_CLOSE = 0;

    // 已开放
    const TASK_NEW_PLAYER_DAILY_STATUS_OPEN = 1;

    // 已开放有可领取奖励的任务
    const TASK_NEW_PLAYER_DAILY_STATUS_CAN_GET = 2;

    // 已开放所有任务奖励都已领取
    const TASK_NEW_PLAYER_DAILY_STATUS_ALL_GET = 3;

    /**********用户任务相关**********/
    // 未完成
    const TASK_USER_UN_FINISH = 0;

    // 已完成，未领取
    const TASK_USER_HAS_FINISH = 1;

    // 已完成，已领取
    const TASK_USER_HAS_GET = 2;

    // 每日任务已发放
    const TASK_USER_EVERY_DAY_HAS_ISSUE = "task_every_day_has_issue_%d";

    /**********任务汇率转换**********/
    const TASK_RATIO = 100;

    /**********redis相关**********/
    // 任务模块缓存
    const TASK_MODULE = "task_module_%d";

    // 任务模块缓存过期时间
    const TASK_MODULE_EXPIRE_TIME = 86400;

    // 任务配置缓存
    const TASK_CONFIG = "task_config_%d";

    // 任务配置缓存过期时间
    const TASK_CONFIG_EXPIRE_TIME = 86400;

}
